home *** CD-ROM | disk | FTP | other *** search
/ AI Game Programming Wisdom / AIGameProgrammingWisdom.iso / SourceCode / 06 General Architectures / 04 Christian / iegoal.h < prev    next >
Encoding:
C/C++ Source or Header  |  2001-09-16  |  1.1 KB  |  48 lines

  1.  
  2. #ifndef _IEGOAL_H_
  3. #define _IEGOAL_H_
  4.  
  5. #include <list>
  6. #include <string>
  7.  
  8. class IERule;
  9. class IEExec;
  10. class IE;
  11.  
  12. class IEGoal
  13. {
  14.  
  15. friend IE;
  16. friend IERule;
  17.  
  18. public:
  19.     IEGoal  ( IEExec * goalExec);
  20.     ~IEGoal ();
  21.  
  22.     void         addRule         ( IERule * rule );
  23.     void         setStart        ( bool start );
  24.     bool         atStart         ();
  25.     bool         start           ();
  26.     void         setFinish       ( bool finish );
  27.     bool         atFinish        ();
  28.     bool         finish          ();
  29.     void         reset           ();
  30.     void         destroyRules    ();
  31.     bool         update          ();
  32.     const char * getName         ();
  33.     void         resetFiredRules ();
  34.  
  35. private:
  36.     std::string m_name;             // goal name
  37.  
  38.     IEExec    * m_goalExec;         // goal executor
  39.  
  40.     std::list<IERule *> m_rules;    // list of rules for this goal
  41.  
  42.     IEGoal    * m_lastGoal;         // goal that had control before this goal
  43.  
  44.     bool        m_start;            // start  flag
  45.     bool        m_finish;           // finish flag
  46. };
  47.  
  48. #endif